<template>
    <div id="slide"></div>
</template>

<script>
import { defineComponent, onMounted, reactive, ref, toRefs } from "vue";
import SlideVerify from "slide-verify";
export default defineComponent({
    setup() {
        const state = reactive({});
        // onMounted(() => {
        //     const Slide = new SlideVerify({
        //         elementId: "slide", // DOM挂载点
        //         onSuccess: () => {
        //             console.log("success");
        //         }, // 成功回调
        //         onFail: () => {
        //             console.log("fail");
        //         }, // 失败回调
        //         onRefresh: () => {
        //             console.log("refresh");
        //         }, // 刷新回调
        //         photo: "https://necaptcha.nosdn.127.net/2551bcfec91c4adeb8907eff3a8bc525@2x.jpg", // 背景图片地址
        //         // source: [100, 60, 310, 210],
        //     });
        // });
        return {
            ...toRefs(state),
        };
    },
});
</script>

<style scoped lang="scss"></style>
